package top.jiangqiang.seataservice1;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class SeataService2Controller {
    private final StockRepository stockRepository;

    @GetMapping("/decreaseStockCount")
    public String decreaseStockCount() {
        int i = stockRepository.decreaseStockCount(1L);
        return "ok";
    }
}
